<?php

namespace app\api\controller;

use think\Controller;
define('DS', DIRECTORY_SEPARATOR);
define('ROOT_PATH', "D:\wwwroot\www\dev002.gxyushengwenhua.com");
define('ADDON_PATH', ROOT_PATH . 'addons' . DS);

class Index extends Controller
{
    public function index()
    {
        return json(['message' => 'Welcome to FastAdmin API!']);
    }

    public function getUser($id)
    {
        // 示例：根据 ID 获取用户信息
        $user = ['id' => $id, 'name' => 'Test User', 'email' => 'user@example.com'];
        return json($user);
    }
}
